<?php
// namespace resgister;
include 'database.php';

$servername = "localhost";
$username = "root";
$password = "";
$dbName = 'taodb';
$headdata = [];
$collectdata = [];


$register = new databaseClass\database($servername, $username, $password,$dbName);



$username = 'taaaqzxs';
$password = md5('123456');
$email = 'koga@com';
$gender = 0;
$collectid = $password.time();
$varname = ['username','password','email','gender','collectid','likeid'];
$headdata = compact($varname);

$collectdata['id'] = $collectid;
$collectdata['collect'] = '44444,4455444,4444455';


$register->begincommit();

$tablename = 'users';
$register->changetb($tablename);
$register->insertdata($headdata);

$tablename = 'collect';
$register->changetb($tablename);
$register->insertdata($collectdata);

$register->commit();
var_dump($register->result);

